;(function(){
    //3实例化
   
 let myChart = echarts.init(document.querySelector(".box-right2"));
 let option = {
    title: {
        text: '出生波动', 
        top: 20,
        textStyle: {
          color: "#faff72",
        }, 
      },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'line',
          lineStyle: {
            color: 'rgba(0,0,0,0.2)',
            width: 1,
            type: 'solid'
          }
        }
      },
      legend: {
        data: ['风象', '土象', '水象', '火象',]
      },
      singleAxis: {
        top: 50,
        bottom: 50,
        axisTick: {},
        axisLabel: {},
        type: 'time',
        axisPointer: {
          animation: true,
          label: {
            show: true
          }
        },
        splitLine: {
          show: true,
          lineStyle: {
            type: 'dashed',
            opacity: 0.2
          }
        }
      },
      series: [
        {
          type: 'themeRiver',
          emphasis: {
            itemStyle: {
              shadowBlur: 20,
              shadowColor: 'rgba(0, 0, 0, 0.8)'
            }
          },
          data: [
            ['2022/6/08', 10, '风象'],
            ['2022/6/09', 15, '风象'],
            ['2022/6/10', 35, '风象'],
            ['2022/6/11', 38, '风象'],
            ['2022/6/12', 22, '风象'],
            ['2022/6/13', 16, '风象'],
            ['2022/6/14', 7, '风象'],
            ['2022/6/15', 2, '风象'],
            ['2022/6/16', 17, '风象'],
            ['2022/6/17', 33, '风象'],
            ['2022/6/18', 40, '风象'],
            ['2022/6/19', 32, '风象'],
            ['2022/6/20', 26, '风象'],
            ['2022/6/21', 35, '风象'],
            ['2022/6/22', 40, '风象'],
            ['2022/6/23', 32, '风象'],
            ['2022/6/24', 26, '风象'],
            ['2022/6/25', 22, '风象'],
            ['2022/6/26', 16, '风象'],
            ['2022/6/27', 22, '风象'],
            ['2022/6/28', 10, '风象'],
            ['2022/6/08', 35, '土象'],
            ['2022/6/09', 36, '土象'],
            ['2022/6/10', 37, '土象'],
            ['2022/6/11', 22, '土象'],
            ['2022/6/12', 24, '土象'],
            ['2022/6/13', 26, '土象'],
            ['2022/6/14', 34, '土象'],
            ['2022/6/15', 21, '土象'],
            ['2022/6/16', 18, '土象'],
            ['2022/6/17', 45, '土象'],
            ['2022/6/18', 32, '土象'],
            ['2022/6/19', 35, '土象'],
            ['2022/6/20', 30, '土象'],
            ['2022/6/21', 28, '土象'],
            ['2022/6/22', 27, '土象'],
            ['2022/6/23', 26, '土象'],
            ['2022/6/24', 15, '土象'],
            ['2022/6/25', 30, '土象'],
            ['2022/6/26', 35, '土象'],
            ['2022/6/27', 42, '土象'],
            ['2022/6/28', 42, '土象'],
            ['2022/6/08', 21, '水象'],
            ['2022/6/09', 25, '水象'],
            ['2022/6/10', 27, '水象'],
            ['2022/6/11', 23, '水象'],
            ['2022/6/12', 24, '水象'],
            ['2022/6/13', 21, '水象'],
            ['2022/6/14', 35, '水象'],
            ['2022/6/15', 39, '水象'],
            ['2022/6/16', 40, '水象'],
            ['2022/6/17', 36, '水象'],
            ['2022/6/18', 33, '水象'],
            ['2022/6/19', 43, '水象'],
            ['2022/6/20', 40, '水象'],
            ['2022/6/21', 34, '水象'],
            ['2022/6/22', 28, '水象'],
            ['2022/6/23', 26, '水象'],
            ['2022/6/24', 37, '水象'],
            ['2022/6/25', 41, '水象'],
            ['2022/6/26', 46, '水象'],
            ['2022/6/27', 47, '水象'],
            ['2022/6/28', 41, '水象'],
            ['2022/6/08', 10, '火象'],
            ['2022/6/09', 15, '火象'],
            ['2022/6/10', 35, '火象'],
            ['2022/6/11', 38, '火象'],
            ['2022/6/12', 22, '火象'],
            ['2022/6/13', 16, '火象'],
            ['2022/6/14', 7, '火象'],
            ['2022/6/15', 2, '火象'],
            ['2022/6/16', 17, '火象'],
            ['2022/6/17', 33, '火象'],
            ['2022/6/18', 40, '火象'],
            ['2022/6/19', 32, '火象'],
            ['2022/6/20', 26, '火象'],
            ['2022/6/21', 35, '火象'],
            ['2022/6/22', 40, '火象'],
            
           
          ]
        }
      ]
 };
 myChart.setOption(option);
 //自适应
 window.addEventListener('resize',()=>{
   myChart.resize()

 })
})()